<template>
	<view class="page-wrap" :data-theme="theme" :class="theme" :style="globalColor.style">
		<HeadCustom></HeadCustom>
		<view class="content-wrap bg-F7F8FF">
			<view class="input-item bg-base">
				<u-radio-group v-model="fromData.status" placement="column" iconPlacement="right">
					<u-radio class="" activeColor="#ad7b54" v-for="(item, index) in list" :key="index" :name="item.personalStatus" :label="item.personalStatus"></u-radio>
				</u-radio-group>
			</view>
		</view>
		<BottomBtn title="保存" @btnClick="verifyTap"></BottomBtn>
	</view>
</template>

<script>
import BottomBtn from '@/components/bottom-btn/index.vue';
import { strTrim } from '@/static/js/common.js';
import { editMixinsMine } from './edit.mixins.mine.js';
import { statusList } from '@/api/mine.js';
export default {
	mixins: [editMixinsMine],
	components: { BottomBtn },
	data() {
		return {
			theme: getApp().globalData.appTheme,
			globalColor: getApp().globalData.globalColor,
			fromData: {
				status: ''
			},
			list: []
		};
	},
	onLoad() {
		this.getList();
	},
	methods: {
		getList() {
			statusList({ current: 1, size: 5000 }).then(res => {
				this.list = res.data.list;
			});
		},
		verifyTap() {
			const { status } = this.fromData;
			if (strTrim(status)) {
				this.putInfo();
			} else {
				uni.showToast({
					icon: 'none',
					title: '请设置身份'
				});
			}
		}
	}
};
</script>

<style lang="scss" scoped>
::v-deep .u-radio {
	// margin-top: 20rpx;
	height: 80rpx;
	border-bottom: 1px solid var(--backgroundDivisionColor);
}
.content-wrap {
	height: calc(100vh);
}
.input-item {
	padding: 0 40rpx 40rpx;
}
.uni-input {
	width: 670rpx;
	height: 220rpx;
	line-height: 46rpx;
	border: 0;
}
.input-tips {
	padding: 15rpx 40rpx;
	line-height: 32rpx;
}
</style>
